import { createApp } from 'vue'
import { createPinia } from 'pinia'
import App from './App.vue'

import i18n from './locales'
import router from './router'

// 适配
import 'lib-flexible-computer'

/* 自定义 svg 图标 */
import svgIcon from './icons'

// 自定义覆盖样式
import './assets/scss/index.scss'

// element-plus 暗黑模式
import 'element-plus/theme-chalk/dark/css-vars.css'

// 监听请求
import './api/listen'

// 权限控制
import './permission'

// 全局组件
import components from './components/index'

//自定义指令
import createDirective from '@/directives/index'

const app = createApp(App)
// Vue3将自定义指令加载到全局方法
createDirective(app)

app.use(createPinia()).use(i18n).use(router).use(svgIcon).use(components).mount('#app')
